package com.foxitcloud.webpdf.provider;


/**
 * @author yxs
 * @version 1.0 Web Reader storage interface, including password, custom
 *          permissions, etc.
 */
public interface IWebReaderStoreProvider {
	/**
	 * save the password of PDF document in order to use for parsing document
	 * next time.
	 * 
	 * @param docID
	 *            document id.
	 * @param password
	 *            password of PDF document.
	 */
	void setPDFPassword(String key, String password);

	/**
	 * Get password of the document.
	 * 
	 * @param fileId
	 *            document id.
	 * @return password of the document.
	 */
	String getPDFPassword(String key);


	/**
	 * Save encrypt information of the document.
	 * 
	 * @param fileId
	 *            document id.
	 * @param isEncryped
	 *            whether the document is encrypted.
	 */
	void setPDFPasswordEncrypted(String key, boolean isEncryped);

	/**
	 * Check whether the document is encrypted.
	 * 
	 * @param fileId
	 *            document id.
	 * @return if the document is encrypted, return true, otherwise return
	 *         false.
	 */
	boolean isPDFPasswordEncrypted(String key);

	/**
	 * Check whether the manifest data has been accessed. This prevent user from
	 * access the URL of other data directly, such as image and text.
	 * 
	 * @param fileId
	 *            document id.
	 * @return return true if the manifest data has been accessed, otherwise
	 *         return false.
	 */
	boolean isManifestDataAccessed(String key);

	/**
	 * 设置对应的试用版属性
	 * @param fileId 文档id
	 * @param isTrail 是否试用版
	 */
	void setTrail(String key, boolean isTrail);
	
	
	boolean getTrail(String key);
}
